# $ANTLR 3.1.2 D:\\Universidad\\Teoria de Lenguajes\\svn\\TP\\Parser\\LL1AST\\LL1AST.g 2010-12-03 18:48:43

import sys
from antlr3 import *
from antlr3.compat import set, frozenset


# for convenience in actions
HIDDEN = BaseRecognizer.HIDDEN

# token types
T__16=16
T__15=15
NEWLINE=11
T__18=18
T__17=17
T__12=12
T__14=14
T__13=13
PARENTESIS=9
SUB=7
EXPRESION=4
DIV=6
EOF=-1
CONC=5
ATOMO=10
SUP=8


class LL1ASTLexer(Lexer):

    grammarFileName = "D:\\Universidad\\Teoria de Lenguajes\\svn\\TP\\Parser\\LL1AST\\LL1AST.g"
    antlr_version = version_str_to_tuple("3.1.2")
    antlr_version_str = "3.1.2"

    def __init__(self, input=None, state=None):
        if state is None:
            state = RecognizerSharedState()
        Lexer.__init__(self, input, state)






    # $ANTLR start "T__12"
    def mT__12(self, ):

        try:
            _type = T__12
            _channel = DEFAULT_CHANNEL

            # D:\\Universidad\\Teoria de Lenguajes\\svn\\TP\\Parser\\LL1AST\\LL1AST.g:7:7: ( '/' )
            # D:\\Universidad\\Teoria de Lenguajes\\svn\\TP\\Parser\\LL1AST\\LL1AST.g:7:9: '/'
            pass 
            self.match(47)



            self._state.type = _type
            self._state.channel = _channel

        finally:

            pass

    # $ANTLR end "T__12"



    # $ANTLR start "T__13"
    def mT__13(self, ):

        try:
            _type = T__13
            _channel = DEFAULT_CHANNEL

            # D:\\Universidad\\Teoria de Lenguajes\\svn\\TP\\Parser\\LL1AST\\LL1AST.g:8:7: ( '^' )
            # D:\\Universidad\\Teoria de Lenguajes\\svn\\TP\\Parser\\LL1AST\\LL1AST.g:8:9: '^'
            pass 
            self.match(94)



            self._state.type = _type
            self._state.channel = _channel

        finally:

            pass

    # $ANTLR end "T__13"



    # $ANTLR start "T__14"
    def mT__14(self, ):

        try:
            _type = T__14
            _channel = DEFAULT_CHANNEL

            # D:\\Universidad\\Teoria de Lenguajes\\svn\\TP\\Parser\\LL1AST\\LL1AST.g:9:7: ( '_' )
            # D:\\Universidad\\Teoria de Lenguajes\\svn\\TP\\Parser\\LL1AST\\LL1AST.g:9:9: '_'
            pass 
            self.match(95)



            self._state.type = _type
            self._state.channel = _channel

        finally:

            pass

    # $ANTLR end "T__14"



    # $ANTLR start "T__15"
    def mT__15(self, ):

        try:
            _type = T__15
            _channel = DEFAULT_CHANNEL

            # D:\\Universidad\\Teoria de Lenguajes\\svn\\TP\\Parser\\LL1AST\\LL1AST.g:10:7: ( '(' )
            # D:\\Universidad\\Teoria de Lenguajes\\svn\\TP\\Parser\\LL1AST\\LL1AST.g:10:9: '('
            pass 
            self.match(40)



            self._state.type = _type
            self._state.channel = _channel

        finally:

            pass

    # $ANTLR end "T__15"



    # $ANTLR start "T__16"
    def mT__16(self, ):

        try:
            _type = T__16
            _channel = DEFAULT_CHANNEL

            # D:\\Universidad\\Teoria de Lenguajes\\svn\\TP\\Parser\\LL1AST\\LL1AST.g:11:7: ( ')' )
            # D:\\Universidad\\Teoria de Lenguajes\\svn\\TP\\Parser\\LL1AST\\LL1AST.g:11:9: ')'
            pass 
            self.match(41)



            self._state.type = _type
            self._state.channel = _channel

        finally:

            pass

    # $ANTLR end "T__16"



    # $ANTLR start "T__17"
    def mT__17(self, ):

        try:
            _type = T__17
            _channel = DEFAULT_CHANNEL

            # D:\\Universidad\\Teoria de Lenguajes\\svn\\TP\\Parser\\LL1AST\\LL1AST.g:12:7: ( '{' )
            # D:\\Universidad\\Teoria de Lenguajes\\svn\\TP\\Parser\\LL1AST\\LL1AST.g:12:9: '{'
            pass 
            self.match(123)



            self._state.type = _type
            self._state.channel = _channel

        finally:

            pass

    # $ANTLR end "T__17"



    # $ANTLR start "T__18"
    def mT__18(self, ):

        try:
            _type = T__18
            _channel = DEFAULT_CHANNEL

            # D:\\Universidad\\Teoria de Lenguajes\\svn\\TP\\Parser\\LL1AST\\LL1AST.g:13:7: ( '}' )
            # D:\\Universidad\\Teoria de Lenguajes\\svn\\TP\\Parser\\LL1AST\\LL1AST.g:13:9: '}'
            pass 
            self.match(125)



            self._state.type = _type
            self._state.channel = _channel

        finally:

            pass

    # $ANTLR end "T__18"



    # $ANTLR start "NEWLINE"
    def mNEWLINE(self, ):

        try:
            _type = NEWLINE
            _channel = DEFAULT_CHANNEL

            # D:\\Universidad\\Teoria de Lenguajes\\svn\\TP\\Parser\\LL1AST\\LL1AST.g:32:8: ( ( '\\r' )? '\\n' )
            # D:\\Universidad\\Teoria de Lenguajes\\svn\\TP\\Parser\\LL1AST\\LL1AST.g:32:10: ( '\\r' )? '\\n'
            pass 
            # D:\\Universidad\\Teoria de Lenguajes\\svn\\TP\\Parser\\LL1AST\\LL1AST.g:32:10: ( '\\r' )?
            alt1 = 2
            LA1_0 = self.input.LA(1)

            if (LA1_0 == 13) :
                alt1 = 1
            if alt1 == 1:
                # D:\\Universidad\\Teoria de Lenguajes\\svn\\TP\\Parser\\LL1AST\\LL1AST.g:32:11: '\\r'
                pass 
                self.match(13)



            self.match(10)



            self._state.type = _type
            self._state.channel = _channel

        finally:

            pass

    # $ANTLR end "NEWLINE"



    # $ANTLR start "ATOMO"
    def mATOMO(self, ):

        try:
            _type = ATOMO
            _channel = DEFAULT_CHANNEL

            # D:\\Universidad\\Teoria de Lenguajes\\svn\\TP\\Parser\\LL1AST\\LL1AST.g:33:7: (~ ( ')' | '(' | '{' | '}' | '^' | '_' | '/' | '\\r' | '\\n' ) )
            # D:\\Universidad\\Teoria de Lenguajes\\svn\\TP\\Parser\\LL1AST\\LL1AST.g:33:9: ~ ( ')' | '(' | '{' | '}' | '^' | '_' | '/' | '\\r' | '\\n' )
            pass 
            if (0 <= self.input.LA(1) <= 9) or (11 <= self.input.LA(1) <= 12) or (14 <= self.input.LA(1) <= 39) or (42 <= self.input.LA(1) <= 46) or (48 <= self.input.LA(1) <= 93) or (96 <= self.input.LA(1) <= 122) or self.input.LA(1) == 124 or (126 <= self.input.LA(1) <= 65535):
                self.input.consume()
            else:
                mse = MismatchedSetException(None, self.input)
                self.recover(mse)
                raise mse




            self._state.type = _type
            self._state.channel = _channel

        finally:

            pass

    # $ANTLR end "ATOMO"



    def mTokens(self):
        # D:\\Universidad\\Teoria de Lenguajes\\svn\\TP\\Parser\\LL1AST\\LL1AST.g:1:8: ( T__12 | T__13 | T__14 | T__15 | T__16 | T__17 | T__18 | NEWLINE | ATOMO )
        alt2 = 9
        LA2_0 = self.input.LA(1)

        if (LA2_0 == 47) :
            alt2 = 1
        elif (LA2_0 == 94) :
            alt2 = 2
        elif (LA2_0 == 95) :
            alt2 = 3
        elif (LA2_0 == 40) :
            alt2 = 4
        elif (LA2_0 == 41) :
            alt2 = 5
        elif (LA2_0 == 123) :
            alt2 = 6
        elif (LA2_0 == 125) :
            alt2 = 7
        elif (LA2_0 == 10 or LA2_0 == 13) :
            alt2 = 8
        elif ((0 <= LA2_0 <= 9) or (11 <= LA2_0 <= 12) or (14 <= LA2_0 <= 39) or (42 <= LA2_0 <= 46) or (48 <= LA2_0 <= 93) or (96 <= LA2_0 <= 122) or LA2_0 == 124 or (126 <= LA2_0 <= 65535)) :
            alt2 = 9
        else:
            nvae = NoViableAltException("", 2, 0, self.input)

            raise nvae

        if alt2 == 1:
            # D:\\Universidad\\Teoria de Lenguajes\\svn\\TP\\Parser\\LL1AST\\LL1AST.g:1:10: T__12
            pass 
            self.mT__12()


        elif alt2 == 2:
            # D:\\Universidad\\Teoria de Lenguajes\\svn\\TP\\Parser\\LL1AST\\LL1AST.g:1:16: T__13
            pass 
            self.mT__13()


        elif alt2 == 3:
            # D:\\Universidad\\Teoria de Lenguajes\\svn\\TP\\Parser\\LL1AST\\LL1AST.g:1:22: T__14
            pass 
            self.mT__14()


        elif alt2 == 4:
            # D:\\Universidad\\Teoria de Lenguajes\\svn\\TP\\Parser\\LL1AST\\LL1AST.g:1:28: T__15
            pass 
            self.mT__15()


        elif alt2 == 5:
            # D:\\Universidad\\Teoria de Lenguajes\\svn\\TP\\Parser\\LL1AST\\LL1AST.g:1:34: T__16
            pass 
            self.mT__16()


        elif alt2 == 6:
            # D:\\Universidad\\Teoria de Lenguajes\\svn\\TP\\Parser\\LL1AST\\LL1AST.g:1:40: T__17
            pass 
            self.mT__17()


        elif alt2 == 7:
            # D:\\Universidad\\Teoria de Lenguajes\\svn\\TP\\Parser\\LL1AST\\LL1AST.g:1:46: T__18
            pass 
            self.mT__18()


        elif alt2 == 8:
            # D:\\Universidad\\Teoria de Lenguajes\\svn\\TP\\Parser\\LL1AST\\LL1AST.g:1:52: NEWLINE
            pass 
            self.mNEWLINE()


        elif alt2 == 9:
            # D:\\Universidad\\Teoria de Lenguajes\\svn\\TP\\Parser\\LL1AST\\LL1AST.g:1:60: ATOMO
            pass 
            self.mATOMO()







 



def main(argv, stdin=sys.stdin, stdout=sys.stdout, stderr=sys.stderr):
    from antlr3.main import LexerMain
    main = LexerMain(LL1ASTLexer)
    main.stdin = stdin
    main.stdout = stdout
    main.stderr = stderr
    main.execute(argv)


if __name__ == '__main__':
    main(sys.argv)
